WITH FD_LANGUAGE_1 AS
  (SELECT ROW_NUMBER() OVER(ORDER BY T.CODE ASC) RN, T.*
  FROM FD_LANGUAGE T
  WHERE 1 = 1
<#if (LOCALE_ID!) != ''>
  AND T.LOCALE_ID = :LOCALE_ID
</#if>
<#if (CODE!) != ''>
  AND (INSTR(T.CODE, :CODE)  > 0
  OR INSTR(T.CONTENT, :CODE)    > 0)
</#if>
  )
SELECT T.*, JD.CODE AS LOCALE_CO, JD.NAME AS LOCALE_NA
FROM FD_LANGUAGE_1 T
JOIN FD_DICTIONARY JD ON (JD.ID = T.LOCALE_ID)
WHERE T.RN BETWEEN :BEGIN__ROW__NUM AND :END__ROW__NUM